<!doctype html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>Spark test page</title>
		<script type="text/javascript" src="../lib/jquery-1.4.4.js"></script>
		<script type="text/javascript" src="../lib/jquery.dump.js"></script><!-- TODO remove from production -->
		<script type="text/javascript" src="../lib/jquery.mapAttributes.js"></script>
		<script type="text/javascript" src="../lib/jquery.xdomain.js"></script>
		<script type="text/javascript" src="../lib/jquery.jqplot.js"></script>
		<script type="text/javascript" src="../lib/jqplot.pieRenderer.js"></script>
		<script type="text/javascript" src="../lib/jqplot.dateAxisRenderer.js"></script>
		<script type="text/javascript" src="../src/jquery.spark.js"></script>
		<script type="text/javascript" src="test.js"></script>
		<link rel="stylesheet" href="../docs/screen.css" type="text/css" media="screen, projection">
		<link rel="stylesheet" href="../docs/print.css" type="text/css" media="print">
		<link rel="stylesheet" href="../lib/jquery.jqplot.min.css" type="text/css">
	</head>
	<body>
		<div class="container">
			<div class="span-24 last prepend-top">
				The phone area code for Berlin is
				<span class="spark"
					data-spark-endpoint="http://dbpedia.org/sparql/"
					data-spark-query="select distinct ?a where
						{ dbpedia:Berlin dbpedia-owl:areaCode ?a }">
					loading...
				</span>.
				 <div class="spark"
                        data-spark-endpoint="http://aemet.linkeddata.es/sparql"
                        data-spark-format="simple"
                        data-spark-query="SELECT ?entity
                                WHERE { ?b ?entity &lt;http://aemet.linkeddata.es/ontology/Observacion&gt;}">
                        loading
                </div>
				<p>
					See <a href="local.html">the local version</a>, with
					static SPARQL results.
				</p>
				<p>
					Spark is developed by
					<span class="spark"
						data-spark-rdf="http://km.aifb.kit.edu/sites/spark/docs/spark-doap.rdf
										http://simia.net/foaf.rdf
										http://harth.org/andreas/foaf.rdf"
						data-spark-ns-doap="http://usefulinc.com/ns/doap#"
						data-spark-param-lastconjunct=" and "
						data-spark-format="simple"
						data-spark-query="select ?name
							where { 
								<http://semanticweb.org/id/Spark> doap:developer ?dev .
								?dev owl:sameAs ?x .
								?x foaf:knows ?p .
								?p foaf:name ?name .
							}"
					>
						<em>loading&hellip;</em>
					</span>.
				</p>
				<p>
					Party results.
					<div class="spark"
						data-spark-format="http://localhost/~denny/spark/rdf-spark/src/jquery.spark.datechart.js"
						data-spark-query="
PREFIX  sdmx-measure: <http://purl.org/linked-data/sdmx/2009/measure#>
PREFIX  gesis:  <http://lod.gesis.org/vocab#>
PREFIX  rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX  qb:   <http://purl.org/linked-data/cube#>
PREFIX  rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX  dcterms: <http://purl.org/dc/terms/>

SELECT  ?s ?series ?series_label ?time ?value
FROM <http://gesis-lod.appspot.com/data?code=14111&ags=05&jahr=2009>
FROM <http://gesis-lod.appspot.com/data?code=14111&ags=05&jahr=2005>
FROM <http://gesis-lod.appspot.com/data?code=14111&ags=05&jahr=2002>
FROM <http://gesis-lod.appspot.com/geo.rdf>
FROM <http://gesis-lod.appspot.com/parteien.rdf>
FROM <http://lod.gesis.org/lodpilot/ALLBUS/ZA4570agg.rdf>

WHERE {
    ?s qb:dataset <http://gesis-lod.appspot.com/data?code=14111#ds> .
    ?s dcterms:date ?time .
    ?s gesis:partei ?series .
    ?series rdfs:label ?series_label .
    ?s sdmx-measure:obsValue ?value .
}
					">
						<em>loading&hellip;</em>
					</div>		
				</p>
				<p>
					Pie charts are evil. But they look pretty.
					<div class="spark"
						data-spark-format="http://localhost/~denny/spark/rdf-spark/src/jquery.spark.piechart.js"
						data-spark-query="
PREFIX  sdmx-measure: <http://purl.org/linked-data/sdmx/2009/measure#>
PREFIX  gesis:  <http://lod.gesis.org/vocab#>
PREFIX  qb:   <http://purl.org/linked-data/cube#>
PREFIX  rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX  dcterms: <http://purl.org/dc/terms/>

SELECT  ?uri ?label ?value
FROM <http://gesis-lod.appspot.com/data?code=14111&ags=05&jahr=2009>
FROM <http://gesis-lod.appspot.com/geo.rdf>
FROM <http://gesis-lod.appspot.com/parteien.rdf>
FROM <http://lod.gesis.org/lodpilot/ALLBUS/ZA4570agg.rdf>

WHERE {
    ?s qb:dataset <http://gesis-lod.appspot.com/data?code=14111#ds> .
    ?s dcterms:date &quot;2009-09-27&quot; .
    ?s gesis:partei ?uri .
    ?uri rdfs:label ?label .
    ?s sdmx-measure:obsValue ?value .
}
						">
						<em>loading&hellip;</em>
					</div>		
				</p>
			</div>
		</div>
	</body>
</html>